package one.stand.mapper;

import one.stand.model.CustomerModel;
import one.stand.model.FinanceModel;
import one.stand.response.GetCustomerInfoResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Administrator
 */
public interface CustomerMapper {
    /**
     * 客户分类统计
     *
     * @param customerModel
     * @return
     */
    List<CustomerModel> countCustomer(CustomerModel customerModel);

    int deleteByPrimaryKey(Integer customerId);

    /**
     * 获取我的客户信息
     *
     * @param record
     * @return
     */
    List<CustomerModel> getCustomer(CustomerModel record);

    List<CustomerModel> selectCustomerList(CustomerModel record);

    /**
     * 获取用户详情
     *
     * @param cardId
     * @return
     */
    GetCustomerInfoResponse getCustomerInfo(CustomerModel cardId);

    int insertSelective(CustomerModel record);

    CustomerModel select(CustomerModel customerModel);

    CustomerModel selectByPrimaryKey(Integer customerId);

    Integer selectCustomerNum(Integer cardId);

    int updateByPrimaryKeySelective(CustomerModel record);

    int updateTurnoverAmount(CustomerModel record);

    int updateMoveCustomer(CustomerModel record);

    List<CustomerModel> selectCustomerAllInfo(CustomerModel record);

    /**
     * 下拉客户列表
     * @param companyId
     * @param name
     * @return
     */
    List<CustomerModel> getCustomerList(@Param("companyId") Integer companyId, @Param("name") String name, @Param("ascriptionId") Integer ascriptionId);

    List<FinanceModel> selectUserSort(FinanceModel record);

    List<FinanceModel> selectUserMySort(FinanceModel record);

}